{smcl}
{com}{sf}{ul off}{txt}{.-}
       log:  {res}MICs.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 9 Jan 2011, 16:44:12

{com}. do "C:\Users\Piotr\AppData\Local\Temp\STD06000000.tmp"
{txt}
{com}. * ESTIMATING AR(p) BY CLASS
. 
. *** MICs ***
. 
. use REGRESSION\MIC_all.dta, clear
{txt}
{com}. 
. *** All incidents
. 
. *MIPT
. sum mAll

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
        mAll {c |}{res}       160    34.18125    20.48834          1        147
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima mAll, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-678.1895{col 48}    3{col 57} 1362.379{col 69} 1371.604
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-676.2682{col 48}    4{col 57} 1360.536{col 69} 1372.837
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-676.2386{col 48}    5{col 57} 1362.477{col 69} 1377.853
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-672.2882{col 48}    6{col 57} 1356.576{col 69} 1375.027
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-671.9139{col 48}    7{col 57} 1357.828{col 69} 1379.354
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-671.8986{col 48}    8{col 57} 1359.797{col 69} 1384.399
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-671.7876{col 48}    9{col 57} 1361.575{col 69} 1389.252
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-671.3966{col 48}   10{col 57} 1362.793{col 69} 1393.545
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(4) according to AIC and AR(1) according to BIC
. * Parsimonity --> estimating AR(1)
. 
. regress mAll L.mAll FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     159
                                                       {help j_robustsingular:F(  5,   152) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.3737
                                                       {txt}Root MSE      = {res} 16.538

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
        mAll {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
        mAll {c |}
         L1. {c |}  {res}  .451029   .1306839     3.45   0.001     .1928377    .7092203
        {txt}FUND {c |}  {res} 8.259227   3.505699     2.36   0.020     1.333038    15.18542
        {txt}POST {c |}  {res}-12.64892   3.728224    -3.39   0.001    -20.01475   -5.283093
        {txt}SEPT {c |}  {res} 3.186274   3.562334     0.89   0.373    -3.851806    10.22436
          {txt}Dp {c |}  {res}-2.430803   3.443968    -0.71   0.481     -9.23503    4.373423
        {txt}IRAQ {c |}  {res} 7.467316   6.712413     1.11   0.268    -5.794358    20.72899
       {txt}_cons {c |}  {res} 16.67291   4.208323     3.96   0.000     8.358547    24.98726
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double mAll_pred
{txt}(option xb assumed; fitted values)
(1 missing value generated)

{com}. line mAll mAll_pred Quarter
{res}{txt}
{com}. drop mAll_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   152) ={res}    0.40
{txt}{col 13}Prob > F ={res}    0.6709
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(1 missing value generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    6.4184
{txt} Prob > chi2({res}4{txt})            = {res}    0.1700
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if mAll==0
{res}    0
{txt}
{com}. * No zero observations, no need to search for c.
. gen lmAll=ln(mAll)
{txt}
{com}. nbreg mAll L.lmAll FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res} -890.5841{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-890.53294{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-890.53294{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-723.39231{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-690.79712{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-685.87481{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-685.86485{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-685.86485{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-648.73648{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-637.55504{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res} -633.4275{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-633.40951{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-633.40951{txt}  

Negative binomial regression                      Number of obs   =  {res}      159
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}5{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-633.40951                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}        mAll{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}       lmAll{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .5367617{col 26}{space 2} .0537969{col 37}{space 1}    9.98{col 46}{space 3}0.000{col 55}{space 3} .4313216{col 67}{space 3} .6422017
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .1721144{col 26}{space 2} .0832154{col 37}{space 1}    2.07{col 46}{space 3}0.039{col 55}{space 3} .0090152{col 67}{space 3} .3352137
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.3076446{col 26}{space 2} .0979972{col 37}{space 1}   -3.14{col 46}{space 3}0.002{col 55}{space 3}-.4997156{col 67}{space 3}-.1155737
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2} .1054576{col 26}{space 2} .1434877{col 37}{space 1}    0.73{col 46}{space 3}0.462{col 55}{space 3}-.1757732{col 67}{space 3} .3866883
{col 1}{text}          Dp{col 14}{c |}{result}{space 2} .0144974{col 26}{space 2} .1254279{col 37}{space 1}    0.12{col 46}{space 3}0.908{col 55}{space 3}-.2313368{col 67}{space 3} .2603315
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2} .1665244{col 26}{space 2} .1847252{col 37}{space 1}    0.90{col 46}{space 3}0.367{col 55}{space 3}-.1955303{col 67}{space 3} .5285791
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} 1.618849{col 26}{space 2}  .187233{col 37}{space 1}    8.65{col 46}{space 3}0.000{col 55}{space 3} 1.251879{col 67}{space 3} 1.985819
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-1.902072{col 27}{space 1} .1831649{col 55}{space 3}-2.261068{col 67}{space 3}-1.543075
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1492591{col 27}{space 1}  .027339{col 55}{space 3} .1042391{col 67}{space 3} .2137229
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[mAll]L.lmAll = 0
{txt} ( 2)  {res}[mAll]FUND = 0
{txt} ( 3)  {res}[mAll]POST = 0
{txt} ( 4)  {res}[mAll]SEPT = 0
{txt} ( 5)  {res}[mAll]Dp = 0
{txt} ( 6)  {res}[mAll]IRAQ = 0

           {txt}chi2(  6) ={res}  456.68
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double mAll_pred
{txt}(option n assumed; predicted number of events)
(1 missing value generated)

{com}. line mAll mAll_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[mAll]SEPT = 0
{txt} ( 2)  {res}[mAll]Dp = 0

{txt}{col 12}chi2(  2) ={res}    1.88
{txt}{col 10}Prob > chi2 =  {res}  0.3913
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (mAll-mAll_pred)/sqrt( mAll_pred*(1+mAll_pred*s2) )
{txt}(1 missing value generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    5.9018
{txt} Prob > chi2({res}4{txt})            = {res}    0.2066
{txt}
{com}. drop nbresidual mAll_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg mAll L.lmAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  159{col 25}-685.8648{col 37}-633.4095{col 48}    7{col 57} 1280.819{col 69} 1302.301
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress mAll L.mAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  159{col 25}-705.3261{col 37}-668.1296{col 48}    6{col 57} 1348.259{col 69} 1366.673
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg mAll L.mAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  159{col 25}-685.8648{col 37}-646.3441{col 48}    7{col 57} 1306.688{col 69} 1328.171
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson mAll L.mAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  159{col 25}-1300.018{col 37}-969.1551{col 48}    6{col 57}  1950.31{col 69} 1968.724
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop lmAll
{txt}
{com}. 
. *ITERATE
. sum iAll

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
        iAll {c |}{res}       160    42.23125    27.79852          2        212
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima iAll, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-729.9784{col 48}    3{col 57} 1465.957{col 69} 1475.182
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-722.9219{col 48}    4{col 57} 1453.844{col 69} 1466.145
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-721.7693{col 48}    5{col 57} 1453.539{col 69} 1468.914
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-720.3576{col 48}    6{col 57} 1452.715{col 69} 1471.166
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-719.8013{col 48}    7{col 57} 1453.603{col 69} 1475.129
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-719.6167{col 48}    8{col 57} 1455.233{col 69} 1479.835
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-719.5502{col 48}    9{col 57}   1457.1{col 69} 1484.777
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-718.9482{col 48}   10{col 57} 1457.896{col 69} 1488.648
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(4) according to AIC and AR(2) according to BIC
. * Estimating AR(2)
. 
. regress iAll L(1/2).iAll FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     158
                                                       {help j_robustsingular:F(  6,   150) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.4625
                                                       {txt}Root MSE      = {res} 20.852

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
        iAll {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
        iAll {c |}
         L1. {c |}  {res} .1804897   .1425368     1.27   0.207    -.1011496     .462129
         {txt}L2. {c |}  {res} .0905527   .0821955     1.10   0.272    -.0718577    .2529632
        {txt}FUND {c |}  {res} 11.97326   5.700498     2.10   0.037     .7096114     23.2369
        {txt}POST {c |}  {res}-28.24592   6.789918    -4.16   0.000    -41.66216   -14.82969
        {txt}SEPT {c |}  {res} -8.87259   3.816319    -2.32   0.021    -16.41327   -1.331906
          {txt}Dp {c |}  {res}-8.510307   2.354818    -3.61   0.000     -13.1632   -3.857411
        {txt}IRAQ {c |}  {res} 4.008471   4.299353     0.93   0.353    -4.486644    12.50359
       {txt}_cons {c |}  {res} 34.93937   6.578555     5.31   0.000     21.94077    47.93798
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double iAll_pred
{txt}(option xb assumed; fitted values)
(2 missing values generated)

{com}. line iAll iAll_pred Quarter
{res}{txt}
{com}. drop iAll_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   150) ={res}   19.24
{txt}{col 13}Prob > F ={res}    0.0000
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(2 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    1.4800
{txt} Prob > chi2({res}4{txt})            = {res}    0.8302
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if iAll==0
{res}    0
{txt}
{com}. * No zero observations, no need to search for c.
. gen liAll=ln(iAll)
{txt}
{com}. nbreg iAll L(1/2).liAll FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-973.83199{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-972.09515{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-972.04802{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-972.04801{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-752.47523{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-730.12961{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-727.70398{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res} -727.6978{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res} -727.6978{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-679.38411{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-649.85445{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-646.97987{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-646.86151{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-646.86141{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-646.86141{txt}  

Negative binomial regression                      Number of obs   =  {res}      158
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}6{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-646.86141                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}        iAll{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}       liAll{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .3944324{col 26}{space 2} .0904096{col 37}{space 1}    4.36{col 46}{space 3}0.000{col 55}{space 3} .2172328{col 67}{space 3}  .571632
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .1725145{col 26}{space 2} .0771953{col 37}{space 1}    2.23{col 46}{space 3}0.025{col 55}{space 3} .0212145{col 67}{space 3} .3238144
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .1251136{col 26}{space 2}  .087907{col 37}{space 1}    1.42{col 46}{space 3}0.155{col 55}{space 3}-.0471809{col 67}{space 3} .2974082
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.4200925{col 26}{space 2} .1079238{col 37}{space 1}   -3.89{col 46}{space 3}0.000{col 55}{space 3}-.6316192{col 67}{space 3}-.2085657
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2}-.0554817{col 26}{space 2} .2318602{col 37}{space 1}   -0.24{col 46}{space 3}0.811{col 55}{space 3}-.5099195{col 67}{space 3}  .398956
{col 1}{text}          Dp{col 14}{c |}{result}{space 2}-1.314353{col 26}{space 2} .1732607{col 37}{space 1}   -7.59{col 46}{space 3}0.000{col 55}{space 3}-1.653937{col 67}{space 3}-.9747677
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2}-.0876606{col 26}{space 2} .2488791{col 37}{space 1}   -0.35{col 46}{space 3}0.725{col 55}{space 3}-.5754547{col 67}{space 3} .4001335
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} 1.718244{col 26}{space 2}  .309722{col 37}{space 1}    5.55{col 46}{space 3}0.000{col 55}{space 3}   1.1112{col 67}{space 3} 2.325288
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2} -1.97288{col 27}{space 1} .1819944{col 55}{space 3}-2.329582{col 67}{space 3}-1.616177
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1390558{col 27}{space 1} .0253074{col 55}{space 3} .0973364{col 67}{space 3} .1986566
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[iAll]L.liAll = 0
{txt} ( 2)  {res}[iAll]L2.liAll = 0
{txt} ( 3)  {res}[iAll]FUND = 0
{txt} ( 4)  {res}[iAll]POST = 0
{txt} ( 5)  {res}[iAll]SEPT = 0
{txt} ( 6)  {res}[iAll]Dp = 0
{txt} ( 7)  {res}[iAll]IRAQ = 0

           {txt}chi2(  7) ={res} 6293.50
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double iAll_pred
{txt}(option n assumed; predicted number of events)
(2 missing values generated)

{com}. line iAll iAll_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[iAll]SEPT = 0
{txt} ( 2)  {res}[iAll]Dp = 0

{txt}{col 12}chi2(  2) ={res}  145.89
{txt}{col 10}Prob > chi2 =  {res}  0.0000
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (iAll-iAll_pred)/sqrt( iAll_pred*(1+iAll_pred*s2) )
{txt}(2 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    2.2039
{txt} Prob > chi2({res}4{txt})            = {res}    0.6983
{txt}
{com}. drop nbresidual iAll_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg iAll L(1/2).liAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-727.6978{col 37}-646.8614{col 48}    8{col 57} 1309.723{col 69} 1334.224
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress iAll L(1/2).iAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-749.0536{col 37}-700.0036{col 48}    7{col 57} 1414.007{col 69} 1435.445
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg iAll L(1/2).iAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-727.6978{col 37}-660.4977{col 48}    8{col 57} 1336.995{col 69} 1361.496
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson iAll L(1/2).iAll FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}  -1757.8{col 37}-1052.252{col 48}    8{col 57} 2120.505{col 69} 2145.006
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop liAll
{txt}
{com}. 
. *** Casualty incidents
. 
. *MIPT
. sum mCasualty

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
   mCasualty {c |}{res}       160    11.71875    8.862451          0         57
{txt}
{com}. tab Quarter if mCasualty==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1968:2 {c |}{res}          1       33.33       33.33
{txt}     1969:2 {c |}{res}          1       33.33       66.67
{txt}     2007:3 {c |}{res}          1       33.33      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}          3      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima mCasualty, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-510.4128{col 48}    3{col 57} 1026.826{col 69} 1036.051
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-507.5712{col 48}    4{col 57} 1023.142{col 69} 1035.443
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-507.5515{col 48}    5{col 57} 1025.103{col 69} 1040.479
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-507.0337{col 48}    6{col 57} 1026.067{col 69} 1044.519
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-506.9572{col 48}    7{col 57} 1027.914{col 69} 1049.441
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-506.7676{col 48}    8{col 57} 1029.535{col 69} 1054.137
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -505.651{col 48}    9{col 57} 1029.302{col 69} 1056.978
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-503.9514{col 48}   10{col 57} 1027.903{col 69} 1058.655
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(2) according to AIC and AR(2) according to BIC
. * Estimating AR(2)
. 
. regress mCasualty L(1/2).mCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     158
                                                       {help j_robustsingular:F(  6,   150) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.5849
                                                       {txt}Root MSE      = {res} 5.8236

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
   mCasualty {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
   mCasualty {c |}
         L1. {c |}  {res} .5614838   .1172226     4.79   0.000      .329863    .7931046
         {txt}L2. {c |}  {res} .1365045   .1028652     1.33   0.187    -.0667473    .3397563
        {txt}FUND {c |}  {res} 1.393192    1.30186     1.07   0.286    -1.179161    3.965544
        {txt}POST {c |}  {res}-1.451439   1.066724    -1.36   0.176    -3.559185    .6563075
        {txt}SEPT {c |}  {res} 2.458309   2.278666     1.08   0.282     -2.04412    6.960737
          {txt}Dp {c |}  {res}-1.519339   2.242322    -0.68   0.499    -5.949954    2.911276
        {txt}IRAQ {c |}  {res} 1.434253    3.65194     0.39   0.695    -5.781634    8.650141
       {txt}_cons {c |}  {res} 2.629336   .9434471     2.79   0.006     .7651736    4.493498
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double mCasualty_pred
{txt}(option xb assumed; fitted values)
(2 missing values generated)

{com}. line mCasualty mCasualty_pred Quarter
{res}{txt}
{com}. drop mCasualty_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   150) ={res}    1.20
{txt}{col 13}Prob > F ={res}    0.3029
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(2 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    0.9244
{txt} Prob > chi2({res}4{txt})            = {res}    0.9210
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if mCasualty==0
{res}    3
{txt}
{com}. * 3 zero observations - grid search to find c ==> c=0.59
. gen ystar=mCasualty
{txt}
{com}. replace ystar=0.59 if mCasualty==0
{txt}(3 real changes made)

{com}. gen lmCasualty=ln(ystar)
{txt}
{com}. nbreg mCasualty L(1/2).lmCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-506.59622{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-506.27064{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-506.27055{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-506.27055{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-555.17117{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-536.16946{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-535.93432{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-535.93432{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-492.94755{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-488.12887{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-476.52027{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res} -468.3729{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-465.92225{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-465.74547{txt}  
Iteration 6:{col 16}log pseudolikelihood = {res}-465.74515{txt}  
Iteration 7:{col 16}log pseudolikelihood = {res}-465.74515{txt}  

Negative binomial regression                      Number of obs   =  {res}      158
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}6{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-465.74515                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}   mCasualty{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}  lmCasualty{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .4569619{col 26}{space 2} .0804977{col 37}{space 1}    5.68{col 46}{space 3}0.000{col 55}{space 3} .2991893{col 67}{space 3} .6147344
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .1943654{col 26}{space 2} .0737773{col 37}{space 1}    2.63{col 46}{space 3}0.008{col 55}{space 3} .0497645{col 67}{space 3} .3389663
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .0956821{col 26}{space 2} .1190691{col 37}{space 1}    0.80{col 46}{space 3}0.422{col 55}{space 3}-.1376891{col 67}{space 3} .3290533
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.1354926{col 26}{space 2} .0893009{col 37}{space 1}   -1.52{col 46}{space 3}0.129{col 55}{space 3}-.3105192{col 67}{space 3} .0395339
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2} .2320751{col 26}{space 2} .2069539{col 37}{space 1}    1.12{col 46}{space 3}0.262{col 55}{space 3}-.1735472{col 67}{space 3} .6376973
{col 1}{text}          Dp{col 14}{c |}{result}{space 2}-.1374965{col 26}{space 2} .1988946{col 37}{space 1}   -0.69{col 46}{space 3}0.489{col 55}{space 3}-.5273227{col 67}{space 3} .2523297
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2}  .075587{col 26}{space 2} .2432163{col 37}{space 1}    0.31{col 46}{space 3}0.756{col 55}{space 3}-.4011081{col 67}{space 3} .5522821
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} .8428713{col 26}{space 2} .1609134{col 37}{space 1}    5.24{col 46}{space 3}0.000{col 55}{space 3} .5274869{col 67}{space 3} 1.158256
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-2.159654{col 27}{space 1} .2108089{col 55}{space 3}-2.572832{col 67}{space 3}-1.746476
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2}  .115365{col 27}{space 1}   .02432{col 55}{space 3} .0763191{col 67}{space 3} .1743874
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[mCasualty]L.lmCasualty = 0
{txt} ( 2)  {res}[mCasualty]L2.lmCasualty = 0
{txt} ( 3)  {res}[mCasualty]FUND = 0
{txt} ( 4)  {res}[mCasualty]POST = 0
{txt} ( 5)  {res}[mCasualty]SEPT = 0
{txt} ( 6)  {res}[mCasualty]Dp = 0
{txt} ( 7)  {res}[mCasualty]IRAQ = 0

           {txt}chi2(  7) ={res}  424.26
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double mCasualty_pred
{txt}(option n assumed; predicted number of events)
(2 missing values generated)

{com}. line mCasualty mCasualty_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[mCasualty]SEPT = 0
{txt} ( 2)  {res}[mCasualty]Dp = 0

{txt}{col 12}chi2(  2) ={res}    1.87
{txt}{col 10}Prob > chi2 =  {res}  0.3929
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (mCasualty-mCasualty_pred)/sqrt( mCasualty_pred*(1+mCasualty_pred*s2) )
{txt}(2 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    2.3162
{txt} Prob > chi2({res}4{txt})            = {res}    0.6778
{txt}
{com}. drop nbresidual mCasualty_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg mCasualty L(1/2).lmCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-535.9343{col 37}-465.7451{col 48}    8{col 57} 947.4903{col 69} 971.9911
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress mCasualty L(1/2).mCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}  -567.92{col 37}-498.4698{col 48}    7{col 57}  1010.94{col 69} 1032.378
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg mCasualty L(1/2).mCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-535.9343{col 37}-480.5182{col 48}    8{col 57} 977.0365{col 69} 1001.537
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson mCasualty L(1/2).mCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-777.7692{col 37}-540.7877{col 48}    7{col 57} 1095.575{col 69} 1117.013
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar lmCasualty
{txt}
{com}. 
. *ITERATE
. sum iCasualty

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
   iCasualty {c |}{res}       160    12.34375    7.357918          0         36
{txt}
{com}. tab Quarter if iCasualty==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1968:2 {c |}{res}          1       50.00       50.00
{txt}     2002:3 {c |}{res}          1       50.00      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}          2      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima iCasualty, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-518.2849{col 48}    3{col 57}  1042.57{col 69} 1051.795
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-510.1527{col 48}    4{col 57} 1028.305{col 69} 1040.606
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-509.9371{col 48}    5{col 57} 1029.874{col 69}  1045.25
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-509.5864{col 48}    6{col 57} 1031.173{col 69} 1049.624
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-509.4866{col 48}    7{col 57} 1032.973{col 69} 1054.499
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -509.363{col 48}    8{col 57} 1034.726{col 69} 1059.327
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}  -509.01{col 48}    9{col 57}  1036.02{col 69} 1063.697
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-508.4493{col 48}   10{col 57} 1036.899{col 69}  1067.65
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(2) according to AIC and AR(2) according to BIC
. * Estimating AR(2)
. 
. regress iCasualty L(1/2).iCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     158
                                                       {help j_robustsingular:F(  6,   150) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.3935
                                                       {txt}Root MSE      = {res} 5.8323

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
   iCasualty {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
   iCasualty {c |}
         L1. {c |}  {res} .2966749   .0893044     3.32   0.001     .1202178     .473132
         {txt}L2. {c |}  {res} .2426456   .0983976     2.47   0.015     .0482212    .4370699
        {txt}FUND {c |}  {res} 2.397418   1.597892     1.50   0.136    -.7598659    5.554702
        {txt}POST {c |}  {res}-4.011089   1.648052    -2.43   0.016    -7.267484   -.7546934
        {txt}SEPT {c |}  {res}-.1842946   1.760858    -0.10   0.917    -3.663583    3.294993
          {txt}Dp {c |}  {res}-3.348284   1.401499    -2.39   0.018    -6.117512   -.5790548
        {txt}IRAQ {c |}  {res} 1.566519   2.195884     0.71   0.477    -2.772341    5.905378
       {txt}_cons {c |}  {res} 5.528288   1.179383     4.69   0.000     3.197939    7.858637
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double iCasualty_pred
{txt}(option xb assumed; fitted values)
(2 missing values generated)

{com}. line iCasualty iCasualty_pred Quarter
{res}{txt}
{com}. drop iCasualty_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   150) ={res}    8.26
{txt}{col 13}Prob > F ={res}    0.0004
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(2 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    0.1233
{txt} Prob > chi2({res}4{txt})            = {res}    0.9982
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if iCasualty==0
{res}    2
{txt}
{com}. * 2 zero observations - grid search to find c ==> c=0.88
. gen ystar=iCasualty
{txt}
{com}. replace ystar=0.88 if iCasualty==0
{txt}(2 real changes made)

{com}. gen liCasualty=ln(ystar)
{txt}
{com}. nbreg iCasualty L(1/2).liCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-527.06132{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-526.93572{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-526.93543{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-526.93543{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-562.76058{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}  -528.395{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-527.71273{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-527.71259{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-527.71259{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-494.29546{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-483.34508{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-481.73614{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-481.71817{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-481.71817{txt}  

Negative binomial regression                      Number of obs   =  {res}      158
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}6{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-481.71817                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}   iCasualty{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}  liCasualty{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .3283038{col 26}{space 2} .0675659{col 37}{space 1}    4.86{col 46}{space 3}0.000{col 55}{space 3} .1958771{col 67}{space 3} .4607304
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .2204597{col 26}{space 2} .0796108{col 37}{space 1}    2.77{col 46}{space 3}0.006{col 55}{space 3} .0644254{col 67}{space 3} .3764939
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .1553263{col 26}{space 2} .0983261{col 37}{space 1}    1.58{col 46}{space 3}0.114{col 55}{space 3}-.0373894{col 67}{space 3}  .348042
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.2779972{col 26}{space 2} .1205226{col 37}{space 1}   -2.31{col 46}{space 3}0.021{col 55}{space 3}-.5142172{col 67}{space 3}-.0417772
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2}  .025106{col 26}{space 2} .2759339{col 37}{space 1}    0.09{col 46}{space 3}0.928{col 55}{space 3}-.5157145{col 67}{space 3} .5659266
{col 1}{text}          Dp{col 14}{c |}{result}{space 2}-.9805041{col 26}{space 2} .2328586{col 37}{space 1}   -4.21{col 46}{space 3}0.000{col 55}{space 3}-1.436899{col 67}{space 3}-.5241095
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2} .0498318{col 26}{space 2} .2900559{col 37}{space 1}    0.17{col 46}{space 3}0.864{col 55}{space 3}-.5186673{col 67}{space 3} .6183309
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} 1.168338{col 26}{space 2} .2107848{col 37}{space 1}    5.54{col 46}{space 3}0.000{col 55}{space 3} .7552072{col 67}{space 3} 1.581468
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-2.097581{col 27}{space 1} .1869376{col 55}{space 3}-2.463972{col 67}{space 3}-1.731191
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1227529{col 27}{space 1} .0229471{col 55}{space 3} .0850962{col 67}{space 3} .1770735
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[iCasualty]L.liCasualty = 0
{txt} ( 2)  {res}[iCasualty]L2.liCasualty = 0
{txt} ( 3)  {res}[iCasualty]FUND = 0
{txt} ( 4)  {res}[iCasualty]POST = 0
{txt} ( 5)  {res}[iCasualty]SEPT = 0
{txt} ( 6)  {res}[iCasualty]Dp = 0
{txt} ( 7)  {res}[iCasualty]IRAQ = 0

           {txt}chi2(  7) ={res} 2928.62
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double iCasualty_pred
{txt}(option n assumed; predicted number of events)
(2 missing values generated)

{com}. line iCasualty iCasualty_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[iCasualty]SEPT = 0
{txt} ( 2)  {res}[iCasualty]Dp = 0

{txt}{col 12}chi2(  2) ={res}   59.63
{txt}{col 10}Prob > chi2 =  {res}  0.0000
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (iCasualty-iCasualty_pred)/sqrt( iCasualty_pred*(1+iCasualty_pred*s2) )
{txt}(2 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    1.0357
{txt} Prob > chi2({res}4{txt})            = {res}    0.9043
{txt}
{com}. drop nbresidual iCasualty_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg iCasualty L(1/2).liCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-527.7126{col 37}-481.7182{col 48}    8{col 57} 979.4363{col 69} 1003.937
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress iCasualty L(1/2).iCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25} -538.215{col 37}-498.7073{col 48}    7{col 57} 1011.415{col 69} 1032.853
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg iCasualty L(1/2).iCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-527.7126{col 37}-485.7085{col 48}    8{col 57} 987.4171{col 69} 1011.918
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson iCasualty L(1/2).iCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-673.6053{col 37}-539.1686{col 48}    7{col 57} 1092.337{col 69} 1113.775
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar liCasualty
{txt}
{com}. 
. *** US target incidents
. 
. *MIPT
. sum mUS_Target

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
  mUS_Target {c |}{res}       160    12.36875    10.06808          0         75
{txt}
{com}. tab Quarter if mUS_Target==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1999:3 {c |}{res}          1       20.00       20.00
{txt}     2000:1 {c |}{res}          1       20.00       40.00
{txt}     2000:3 {c |}{res}          1       20.00       60.00
{txt}     2007:3 {c |}{res}          1       20.00       80.00
{txt}     2007:4 {c |}{res}          1       20.00      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}          5      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima mUS_Target, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-577.6749{col 48}    3{col 57}  1161.35{col 69} 1170.575
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-565.0697{col 48}    4{col 57} 1138.139{col 69}  1150.44
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-564.9244{col 48}    5{col 57} 1139.849{col 69} 1155.225
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-559.5739{col 48}    6{col 57} 1131.148{col 69} 1149.599
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-556.0931{col 48}    7{col 57} 1126.186{col 69} 1147.712
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -556.043{col 48}    8{col 57} 1128.086{col 69} 1152.687
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-556.0199{col 48}    9{col 57}  1130.04{col 69} 1157.716
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-556.0079{col 48}   10{col 57} 1132.016{col 69} 1162.767
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(5) according to AIC and AR(5) according to BIC
. * Estimating AR(5)
. 
. regress mUS_Target L(1/5).mUS_Target FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     155
                                                       {help j_robustsingular:F(  9,   144) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.4418
                                                       {txt}Root MSE      = {res} 7.8461

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
  mUS_Target {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
  mUS_Target {c |}
         L1. {c |}  {res} .1343377   .1240525     1.08   0.281    -.1108615    .3795368
         {txt}L2. {c |}  {res} .2258604   .0736449     3.07   0.003     .0802958    .3714251
         {txt}L3. {c |}  {res}-.1367223   .1031434    -1.33   0.187    -.3405931    .0671485
         {txt}L4. {c |}  {res} .1962957   .0800874     2.45   0.015      .037997    .3545944
         {txt}L5. {c |}  {res} .2171207   .1474516     1.47   0.143    -.0743284    .5085698
        {txt}FUND {c |}  {res} 1.745679   1.783377     0.98   0.329    -1.779299    5.270658
        {txt}POST {c |}  {res} -6.45003    1.73045    -3.73   0.000    -9.870394   -3.029666
        {txt}SEPT {c |}  {res}  3.33147   1.971986     1.69   0.093     -.566308    7.229248
          {txt}Dp {c |}  {res}-1.423783   1.708715    -0.83   0.406    -4.801187    1.953622
        {txt}IRAQ {c |}  {res}-2.011012   2.407719    -0.84   0.405    -6.770049    2.748024
       {txt}_cons {c |}  {res} 5.566397   2.297428     2.42   0.017     1.025358    10.10744
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double mUS_Target_pred
{txt}(option xb assumed; fitted values)
(5 missing values generated)

{com}. line mUS_Target mUS_Target_pred Quarter
{res}{txt}
{com}. drop mUS_Target_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   144) ={res}    2.16
{txt}{col 13}Prob > F ={res}    0.1189
{txt}
{com}. 
. * Ljung-Box statistic Q(6) - testing H0: white noise(in residuals)--> the first 6 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(5 missing values generated)

{com}. wntestq resid, lags(6)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    0.1247
{txt} Prob > chi2({res}6{txt})            = {res}    1.0000
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if mUS_Target==0
{res}    5
{txt}
{com}. * 5 zero observations - grid search to find c ==> c=0.42
. gen ystar=mUS_Target
{txt}
{com}. replace ystar=0.42 if mUS_Target==0
{txt}(5 real changes made)

{com}. gen lmUS_Target=ln(ystar)
{txt}
{com}. nbreg mUS_Target L(1/5).lmUS_Target FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-558.82794{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-558.57301{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-558.57292{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-558.57292{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-553.02836{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-543.02707{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-542.94562{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-542.94562{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-499.72702{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-474.91198{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-471.78868{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-471.70814{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-471.70809{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-471.70809{txt}  

Negative binomial regression                      Number of obs   =  {res}      155
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}9{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-471.70809                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}  mUS_Target{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text} lmUS_Target{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .3058315{col 26}{space 2} .0731184{col 37}{space 1}    4.18{col 46}{space 3}0.000{col 55}{space 3} .1625219{col 67}{space 3}  .449141
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .3077488{col 26}{space 2}   .07176{col 37}{space 1}    4.29{col 46}{space 3}0.000{col 55}{space 3} .1671018{col 67}{space 3} .4483957
{col 1}{text}         L3.{col 14}{c |}{result}{space 2}-.1961262{col 26}{space 2} .0840382{col 37}{space 1}   -2.33{col 46}{space 3}0.020{col 55}{space 3}-.3608382{col 67}{space 3}-.0314143
{col 1}{text}         L4.{col 14}{c |}{result}{space 2} .2051765{col 26}{space 2} .0647771{col 37}{space 1}    3.17{col 46}{space 3}0.002{col 55}{space 3} .0782157{col 67}{space 3} .3321374
{col 1}{text}         L5.{col 14}{c |}{result}{space 2} .1487218{col 26}{space 2} .0658041{col 37}{space 1}    2.26{col 46}{space 3}0.024{col 55}{space 3}  .019748{col 67}{space 3} .2776955
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .0600753{col 26}{space 2} .0982224{col 37}{space 1}    0.61{col 46}{space 3}0.541{col 55}{space 3}-.1324372{col 67}{space 3} .2525878
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.3423458{col 26}{space 2} .1359344{col 37}{space 1}   -2.52{col 46}{space 3}0.012{col 55}{space 3}-.6087724{col 67}{space 3}-.0759192
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2} .4069663{col 26}{space 2} .2235588{col 37}{space 1}    1.82{col 46}{space 3}0.069{col 55}{space 3}-.0312008{col 67}{space 3} .8451334
{col 1}{text}          Dp{col 14}{c |}{result}{space 2} .1466726{col 26}{space 2} .2272184{col 37}{space 1}    0.65{col 46}{space 3}0.519{col 55}{space 3}-.2986673{col 67}{space 3} .5920124
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2}-.3710519{col 26}{space 2} .2524431{col 37}{space 1}   -1.47{col 46}{space 3}0.142{col 55}{space 3}-.8658314{col 67}{space 3} .1237275
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} .7077083{col 26}{space 2} .2251955{col 37}{space 1}    3.14{col 46}{space 3}0.002{col 55}{space 3} .2663332{col 67}{space 3} 1.149083
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-1.770583{col 27}{space 1} .1755716{col 55}{space 3}-2.114697{col 67}{space 3}-1.426469
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1702337{col 27}{space 1} .0298882{col 55}{space 3} .1206699{col 67}{space 3} .2401555
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[mUS_Target]L.lmUS_Target = 0
{txt} ( 2)  {res}[mUS_Target]L2.lmUS_Target = 0
{txt} ( 3)  {res}[mUS_Target]L3.lmUS_Target = 0
{txt} ( 4)  {res}[mUS_Target]L4.lmUS_Target = 0
{txt} ( 5)  {res}[mUS_Target]L5.lmUS_Target = 0
{txt} ( 6)  {res}[mUS_Target]FUND = 0
{txt} ( 7)  {res}[mUS_Target]POST = 0
{txt} ( 8)  {res}[mUS_Target]SEPT = 0
{txt} ( 9)  {res}[mUS_Target]Dp = 0
{txt} (10)  {res}[mUS_Target]IRAQ = 0

           {txt}chi2( 10) ={res}  936.87
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double mUS_Target_pred
{txt}(option n assumed; predicted number of events)
(5 missing values generated)

{com}. line mUS_Target mUS_Target_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[mUS_Target]SEPT = 0
{txt} ( 2)  {res}[mUS_Target]Dp = 0

{txt}{col 12}chi2(  2) ={res}   11.77
{txt}{col 10}Prob > chi2 =  {res}  0.0028
{txt}
{com}. * Ljung-Box statistic Q(6) - testing H0: white noise(in residuals)--> the first 6 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (mUS_Target-mUS_Target_pred)/sqrt( mUS_Target_pred*(1+mUS_Target_pred*s2) )
{txt}(5 missing values generated)

{com}. wntestq nbresidual, lags(6)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    1.8225
{txt} Prob > chi2({res}6{txt})            = {res}    0.9353
{txt}
{com}. drop nbresidual mUS_Target_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg mUS_Target L(1/5).lmUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  155{col 25}-542.9456{col 37}-471.7081{col 48}   11{col 57} 965.4162{col 69} 998.8939
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress mUS_Target L(1/5).mUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  155{col 25}-578.7156{col 37}-533.5328{col 48}   10{col 57} 1087.066{col 69}   1117.5
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg mUS_Target L(1/5).mUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  155{col 25}-542.9456{col 37}-488.0595{col 48}   11{col 57}  998.119{col 69} 1031.597
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson mUS_Target L(1/5).mUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  155{col 25}-873.7362{col 37}-598.3633{col 48}   10{col 57} 1216.727{col 69} 1247.161
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar lmUS_Target
{txt}
{com}. 
. *ITERATE
. sum iUS_Target

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
  iUS_Target {c |}{res}       160    16.09375    13.99766          0        104
{txt}
{com}. tab Quarter if iCasualty==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1968:2 {c |}{res}          1       50.00       50.00
{txt}     2002:3 {c |}{res}          1       50.00      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}          2      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima iUS_Target, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-621.8455{col 48}    3{col 57} 1249.691{col 69} 1258.917
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-615.0928{col 48}    4{col 57} 1238.186{col 69} 1250.486
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-614.6288{col 48}    5{col 57} 1239.258{col 69} 1254.634
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -612.907{col 48}    6{col 57} 1237.814{col 69} 1256.265
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-612.7756{col 48}    7{col 57} 1239.551{col 69} 1261.077
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-612.7697{col 48}    8{col 57} 1241.539{col 69} 1266.141
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-612.7396{col 48}    9{col 57} 1243.479{col 69} 1271.156
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-611.3453{col 48}   10{col 57} 1242.691{col 69} 1273.442
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(4) according to AIC and AR(2) according to BIC
. * Estimating AR(2)
. 
. regress iUS_Target L(1/2).iUS_Target FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     158
                                                       {help j_robustsingular:F(  6,   150) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.4004
                                                       {txt}Root MSE      = {res} 11.136

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
  iUS_Target {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
  iUS_Target {c |}
         L1. {c |}  {res} .2895473   .1911646     1.51   0.132    -.0881757    .6672704
         {txt}L2. {c |}  {res} .1884168   .0923585     2.04   0.043      .005925    .3709085
        {txt}FUND {c |}  {res}-3.915609   3.448589    -1.14   0.258    -10.72969    2.898476
        {txt}POST {c |}  {res} -4.89506   2.219412    -2.21   0.029    -9.280408   -.5097114
        {txt}SEPT {c |}  {res}-.2310243   1.822883    -0.13   0.899    -3.832869     3.37082
          {txt}Dp {c |}  {res}-6.802707    1.42607    -4.77   0.000    -9.620486   -3.984928
        {txt}IRAQ {c |}  {res}-1.603187   1.569547    -1.02   0.309    -4.704463     1.49809
       {txt}_cons {c |}  {res} 13.44073   4.528745     2.97   0.003     4.492363    22.38911
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double iUS_Target_pred
{txt}(option xb assumed; fitted values)
(2 missing values generated)

{com}. line iUS_Target iUS_Target_pred Quarter
{res}{txt}
{com}. drop iUS_Target_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   150) ={res}   25.95
{txt}{col 13}Prob > F ={res}    0.0000
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(2 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    3.0578
{txt} Prob > chi2({res}4{txt})            = {res}    0.5482
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if iUS_Target==0
{res}    2
{txt}
{com}. * 2 zero observations - grid search to find c ==> c=0.2
. gen ystar=iUS_Target
{txt}
{com}. replace ystar=0.2 if iUS_Target==0
{txt}(2 real changes made)

{com}. gen liUS_Target=ln(ystar)
{txt}
{com}. nbreg iUS_Target L(1/2).liUS_Target FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-733.32311{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-731.69192{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-731.42494{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-731.36036{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res} -731.3462{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-731.34301{txt}  
Iteration 6:{col 16}log pseudolikelihood = {res}-731.34249{txt}  
Iteration 7:{col 16}log pseudolikelihood = {res}-731.34243{txt}  
Iteration 8:{col 16}log pseudolikelihood = {res}-731.34242{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}  -602.295{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-593.51748{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res} -593.4034{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-593.40339{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-557.52617{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-535.50089{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-533.84039{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-533.81026{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-533.81025{txt}  

Negative binomial regression                      Number of obs   =  {res}      158
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}7{txt})    =  {res}   574.10
{txt}Log pseudolikelihood = {res}-533.81025                 {txt}Prob > chi2     =  {res}   0.0000

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text}  iUS_Target{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text} liUS_Target{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .2469246{col 26}{space 2} .0718055{col 37}{space 1}    3.44{col 46}{space 3}0.001{col 55}{space 3} .1061885{col 67}{space 3} .3876607
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .2623881{col 26}{space 2} .0605581{col 37}{space 1}    4.33{col 46}{space 3}0.000{col 55}{space 3} .1436964{col 67}{space 3} .3810798
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} -.111021{col 26}{space 2} .1331995{col 37}{space 1}   -0.83{col 46}{space 3}0.405{col 55}{space 3}-.3720872{col 67}{space 3} .1500452
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.3200467{col 26}{space 2} .1601271{col 37}{space 1}   -2.00{col 46}{space 3}0.046{col 55}{space 3}-.6338901{col 67}{space 3}-.0062033
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2} .1406743{col 26}{space 2} .2289874{col 37}{space 1}    0.61{col 46}{space 3}0.539{col 55}{space 3}-.3081327{col 67}{space 3} .5894814
{col 1}{text}          Dp{col 14}{c |}{result}{space 2}-18.08736{col 26}{space 2} 1.023084{col 37}{space 1}  -17.68{col 46}{space 3}0.000{col 55}{space 3}-20.09257{col 67}{space 3}-16.08215
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2}-.4793011{col 26}{space 2} .2348534{col 37}{space 1}   -2.04{col 46}{space 3}0.041{col 55}{space 3}-.9396053{col 67}{space 3}-.0189969
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} 1.622507{col 26}{space 2} .2847434{col 37}{space 1}    5.70{col 46}{space 3}0.000{col 55}{space 3}  1.06442{col 67}{space 3} 2.180594
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-1.367089{col 27}{space 1} .1738472{col 55}{space 3}-1.707823{col 67}{space 3}-1.026355
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .2548478{col 27}{space 1} .0443046{col 55}{space 3} .1812599{col 67}{space 3} .3583107
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[iUS_Target]L.liUS_Target = 0
{txt} ( 2)  {res}[iUS_Target]L2.liUS_Target = 0
{txt} ( 3)  {res}[iUS_Target]FUND = 0
{txt} ( 4)  {res}[iUS_Target]POST = 0
{txt} ( 5)  {res}[iUS_Target]SEPT = 0
{txt} ( 6)  {res}[iUS_Target]Dp = 0
{txt} ( 7)  {res}[iUS_Target]IRAQ = 0

           {txt}chi2(  7) ={res}  574.10
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double iUS_Target_pred
{txt}(option n assumed; predicted number of events)
(2 missing values generated)

{com}. line iUS_Target iUS_Target_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[iUS_Target]SEPT = 0
{txt} ( 2)  {res}[iUS_Target]Dp = 0

{txt}{col 12}chi2(  2) ={res}  317.75
{txt}{col 10}Prob > chi2 =  {res}  0.0000
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (iUS_Target-iUS_Target_pred)/sqrt( iUS_Target_pred*(1+iUS_Target_pred*s2) )
{txt}(2 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    7.6476
{txt} Prob > chi2({res}4{txt})            = {res}    0.1054
{txt}
{com}. drop nbresidual iUS_Target_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg iUS_Target L(1/2).liUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-593.4034{col 37}-533.8103{col 48}    9{col 57} 1085.621{col 69} 1113.184
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress iUS_Target L(1/2).iUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-641.3001{col 37} -600.894{col 48}    7{col 57} 1215.788{col 69} 1237.226
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg iUS_Target L(1/2).iUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-593.4034{col 37}-538.9734{col 48}    9{col 57} 1095.947{col 69}  1123.51
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson iUS_Target L(1/2).iUS_Target FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-1139.959{col 37} -767.221{col 48}    8{col 57} 1550.442{col 69} 1574.943
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar liUS_Target
{txt}
{com}. 
. *** Casualty incidents with a U.S. Target                                                                                               
. 
. *MIPT
. sum mUSCasualty

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
 mUSCasualty {c |}{res}       160     2.99375    2.546417          0         14
{txt}
{com}. tab Quarter if mUSCasualty==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1968:2 {c |}{res}          1        3.85        3.85
{txt}     1969:1 {c |}{res}          1        3.85        7.69
{txt}     1969:2 {c |}{res}          1        3.85       11.54
{txt}     1969:4 {c |}{res}          1        3.85       15.38
{txt}     1971:4 {c |}{res}          1        3.85       19.23
{txt}     1972:3 {c |}{res}          1        3.85       23.08
{txt}     1973:1 {c |}{res}          1        3.85       26.92
{txt}     1978:3 {c |}{res}          1        3.85       30.77
{txt}     1980:3 {c |}{res}          1        3.85       34.62
{txt}     1986:3 {c |}{res}          1        3.85       38.46
{txt}     1987:1 {c |}{res}          1        3.85       42.31
{txt}     1993:2 {c |}{res}          1        3.85       46.15
{txt}     1993:4 {c |}{res}          1        3.85       50.00
{txt}     1995:1 {c |}{res}          1        3.85       53.85
{txt}     1997:1 {c |}{res}          1        3.85       57.69
{txt}     1997:2 {c |}{res}          1        3.85       61.54
{txt}     1997:3 {c |}{res}          1        3.85       65.38
{txt}     1997:4 {c |}{res}          1        3.85       69.23
{txt}     1998:4 {c |}{res}          1        3.85       73.08
{txt}     1999:3 {c |}{res}          1        3.85       76.92
{txt}     1999:4 {c |}{res}          1        3.85       80.77
{txt}     2000:1 {c |}{res}          1        3.85       84.62
{txt}     2000:3 {c |}{res}          1        3.85       88.46
{txt}     2007:2 {c |}{res}          1        3.85       92.31
{txt}     2007:3 {c |}{res}          1        3.85       96.15
{txt}     2007:4 {c |}{res}          1        3.85      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         26      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima mUSCasualty, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-351.6389{col 48}    3{col 57} 709.2777{col 69} 718.5032
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-341.4409{col 48}    4{col 57} 690.8818{col 69} 703.1825
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-340.9516{col 48}    5{col 57} 691.9032{col 69} 707.2791
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-336.8396{col 48}    6{col 57} 685.6792{col 69} 704.1303
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-336.5234{col 48}    7{col 57} 687.0467{col 69}  708.573
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-334.0488{col 48}    8{col 57} 684.0976{col 69}  708.699
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-333.5424{col 48}    9{col 57} 685.0848{col 69} 712.7614
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-333.5316{col 48}   10{col 57} 687.0632{col 69}  717.815
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(6) according to AIC and AR(2) according to BIC
. * Parsimonity --> estimating AR(2)
. 
. regress mUSCasualty L(1/2).mUSCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     158
                                                       {help j_robustsingular:F(  6,   150) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.3837
                                                       {txt}Root MSE      = {res}  2.045

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
 mUSCasualty {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
 mUSCasualty {c |}
         L1. {c |}  {res} .2676393    .111333     2.40   0.017     .0476558    .4876228
         {txt}L2. {c |}  {res}  .278006   .0814239     3.41   0.001     .1171201    .4388918
        {txt}FUND {c |}  {res} .8230504   .4569299     1.80   0.074    -.0797999    1.725901
        {txt}POST {c |}  {res}-1.256689   .4803908    -2.62   0.010    -2.205896   -.3074819
        {txt}SEPT {c |}  {res}  1.10867   .7120404     1.56   0.122     -.298254    2.515595
          {txt}Dp {c |}  {res}-1.579137    .667003    -2.37   0.019    -2.897072   -.2612021
        {txt}IRAQ {c |}  {res} .2628365   .9843235     0.27   0.790    -1.682093    2.207767
       {txt}_cons {c |}  {res}  1.09082   .3696497     2.95   0.004     .3604276    1.821213
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double mUSCasualty_pred
{txt}(option xb assumed; fitted values)
(2 missing values generated)

{com}. line mUSCasualty mUSCasualty_pred Quarter
{res}{txt}
{com}. drop mUSCasualty_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   150) ={res}    4.53
{txt}{col 13}Prob > F ={res}    0.0123
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(2 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    8.1021
{txt} Prob > chi2({res}4{txt})            = {res}    0.0879
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if mUSCasualty==0
{res}   26
{txt}
{com}. * 26 zero observations - grid search to find c ==> c=0.01
. gen ystar=mUSCasualty
{txt}
{com}. replace ystar=0.01 if mUSCasualty==0
{txt}(26 real changes made)

{com}. gen lmUSCasualty=ln(ystar)
{txt}
{com}. nbreg mUSCasualty L(1/2).lmUSCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res} -320.8172{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-320.80447{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-320.80447{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-356.54234{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-347.25425{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-347.22579{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-347.22578{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-324.38634{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-317.57083{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-316.38063{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-316.36154{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-316.36153{txt}  

Negative binomial regression                      Number of obs   =  {res}      158
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}6{txt})    =  {res}        .
{txt}Log pseudolikelihood = {res}-316.36153                 {txt}Prob > chi2     =  {res}        .

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text} mUSCasualty{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}lmUSCasualty{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .0871514{col 26}{space 2} .0392913{col 37}{space 1}    2.22{col 46}{space 3}0.027{col 55}{space 3} .0101419{col 67}{space 3} .1641609
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .1027345{col 26}{space 2} .0463398{col 37}{space 1}    2.22{col 46}{space 3}0.027{col 55}{space 3} .0119102{col 67}{space 3} .1935589
{col 1}{text}        FUND{col 14}{c |}{result}{space 2}  .393706{col 26}{space 2} .1441701{col 37}{space 1}    2.73{col 46}{space 3}0.006{col 55}{space 3} .1111378{col 67}{space 3} .6762741
{col 1}{text}        POST{col 14}{c |}{result}{space 2}-.6733309{col 26}{space 2} .1977783{col 37}{space 1}   -3.40{col 46}{space 3}0.001{col 55}{space 3}-1.060969{col 67}{space 3}-.2856925
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2} .3789078{col 26}{space 2} .2905061{col 37}{space 1}    1.30{col 46}{space 3}0.192{col 55}{space 3}-.1904737{col 67}{space 3} .9482893
{col 1}{text}          Dp{col 14}{c |}{result}{space 2}-.9937699{col 26}{space 2} .2400751{col 37}{space 1}   -4.14{col 46}{space 3}0.000{col 55}{space 3}-1.464309{col 67}{space 3}-.5232313
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2} .3987375{col 26}{space 2} .2786615{col 37}{space 1}    1.43{col 46}{space 3}0.152{col 55}{space 3} -.147429{col 67}{space 3}  .944904
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} .8340783{col 26}{space 2} .1174356{col 37}{space 1}    7.10{col 46}{space 3}0.000{col 55}{space 3} .6039088{col 67}{space 3} 1.064248
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-2.023104{col 27}{space 1} .4882891{col 55}{space 3}-2.980133{col 67}{space 3}-1.066075
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1322443{col 27}{space 1} .0645734{col 55}{space 3} .0507861{col 67}{space 3} .3443573
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[mUSCasualty]L.lmUSCasualty = 0
{txt} ( 2)  {res}[mUSCasualty]L2.lmUSCasualty = 0
{txt} ( 3)  {res}[mUSCasualty]FUND = 0
{txt} ( 4)  {res}[mUSCasualty]POST = 0
{txt} ( 5)  {res}[mUSCasualty]SEPT = 0
{txt} ( 6)  {res}[mUSCasualty]Dp = 0
{txt} ( 7)  {res}[mUSCasualty]IRAQ = 0

           {txt}chi2(  7) ={res}  599.53
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double mUSCasualty_pred
{txt}(option n assumed; predicted number of events)
(2 missing values generated)

{com}. line mUSCasualty mUSCasualty_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[mUSCasualty]SEPT = 0
{txt} ( 2)  {res}[mUSCasualty]Dp = 0

{txt}{col 12}chi2(  2) ={res}   30.84
{txt}{col 10}Prob > chi2 =  {res}  0.0000
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (mUSCasualty-mUSCasualty_pred)/sqrt( mUSCasualty_pred*(1+mUSCasualty_pred*s2) )
{txt}(2 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    5.4049
{txt} Prob > chi2({res}4{txt})            = {res}    0.2482
{txt}
{com}. drop nbresidual mUSCasualty_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg mUSCasualty L(1/2).lmUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-347.2258{col 37}-316.3615{col 48}    8{col 57} 648.7231{col 69} 673.2238
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress mUSCasualty L(1/2).mUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-371.3614{col 37}-333.1228{col 48}    7{col 57} 680.2457{col 69} 701.6838
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg mUSCasualty L(1/2).mUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-347.2258{col 37}-312.3129{col 48}    8{col 57} 640.6258{col 69} 665.1265
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson mUSCasualty L(1/2).mUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  158{col 25}-376.6714{col 37}-315.9557{col 48}    7{col 57} 645.9114{col 69} 667.3496
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar lmUSCasualty
{txt}
{com}. 
. *ITERATE
. sum iUSCasualty

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
 iUSCasualty {c |}{res}       160     3.63125    2.847534          0         14
{txt}
{com}. tab Quarter if iUSCasualty==0

    {txt}Quarter {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
     1968:2 {c |}{res}          1        5.26        5.26
{txt}     1969:1 {c |}{res}          1        5.26       10.53
{txt}     1986:3 {c |}{res}          1        5.26       15.79
{txt}     1993:2 {c |}{res}          1        5.26       21.05
{txt}     1993:4 {c |}{res}          1        5.26       26.32
{txt}     1994:4 {c |}{res}          1        5.26       31.58
{txt}     1995:1 {c |}{res}          1        5.26       36.84
{txt}     1995:3 {c |}{res}          1        5.26       42.11
{txt}     1996:3 {c |}{res}          1        5.26       47.37
{txt}     1997:1 {c |}{res}          1        5.26       52.63
{txt}     1997:2 {c |}{res}          1        5.26       57.89
{txt}     1998:1 {c |}{res}          1        5.26       63.16
{txt}     2000:1 {c |}{res}          1        5.26       68.42
{txt}     2000:2 {c |}{res}          1        5.26       73.68
{txt}     2001:1 {c |}{res}          1        5.26       78.95
{txt}     2001:3 {c |}{res}          1        5.26       84.21
{txt}     2002:2 {c |}{res}          1        5.26       89.47
{txt}     2002:3 {c |}{res}          1        5.26       94.74
{txt}     2007:3 {c |}{res}          1        5.26      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         19      100.00
{txt}
{com}. forvalues i=1/8 {c -(}
{txt}  2{com}. qui arima iUSCasualty, ar(1/`i')
{txt}  3{com}. estat ic
{txt}  4{com}. {c )-}

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-382.4188{col 48}    3{col 57} 770.8375{col 69}  780.063
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -375.839{col 48}    4{col 57}  759.678{col 69} 771.9786
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-375.3068{col 48}    5{col 57} 760.6137{col 69} 775.9896
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37} -370.718{col 48}    6{col 57}  753.436{col 69} 771.8871
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-369.5911{col 48}    7{col 57} 753.1823{col 69} 774.7085
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-369.3261{col 48}    8{col 57} 754.6521{col 69} 779.2535
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-369.3192{col 48}    9{col 57} 756.6384{col 69}  784.315
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  160{col 25}        .{col 37}-367.4379{col 48}   10{col 57} 754.8758{col 69} 785.6276
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. 
. * Choosing model AR(5) according to AIC and AR(4) according to BIC
. * Estimating AR(4)
. 
. regress iUSCasualty L(1/4).iUSCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Linear regression                                      Number of obs ={res}     156
                                                       {help j_robustsingular:F(  8,   146) =}       .
                                                       {txt}Prob > F      = {res}      .
                                                       {txt}R-squared     = {res} 0.3011
                                                       {txt}Root MSE      = {res} 2.4702

{txt}{hline 13}{c TT}{hline 64}
             {c |}               Robust
 iUSCasualty {c |}      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
{hline 13}{char +}{hline 64}
 iUSCasualty {c |}
         L1. {c |}  {res} .1546599   .0950041     1.63   0.106    -.0331011    .3424209
         {txt}L2. {c |}  {res} .1326491   .0826046     1.61   0.110    -.0306062    .2959043
         {txt}L3. {c |}  {res}-.0284841    .086302    -0.33   0.742    -.1990468    .1420785
         {txt}L4. {c |}  {res} .1996991   .0782136     2.55   0.012     .0451219    .3542763
        {txt}FUND {c |}  {res} .1916957   .5608257     0.34   0.733    -.9166897    1.300081
        {txt}POST {c |}  {res}-1.844449    .567224    -3.25   0.001     -2.96548   -.7234185
        {txt}SEPT {c |}  {res} 1.294279    .966619     1.34   0.183     -.616094    3.204652
          {txt}Dp {c |}  {res}-2.779191   .9627447    -2.89   0.004    -4.681907   -.8764747
        {txt}IRAQ {c |}  {res} .3333708   1.192756     0.28   0.780    -2.023928     2.69067
       {txt}_cons {c |}  {res}  2.35974    .638729     3.69   0.000      1.09739    3.622089
{txt}{hline 13}{c BT}{hline 64}

{com}. 
. predict double iUSCasualty_pred
{txt}(option xb assumed; fitted values)
(4 missing values generated)

{com}. line iUSCasualty iUSCasualty_pred Quarter
{res}{txt}
{com}. drop iUSCasualty_pred
{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}SEPT = 0
{txt} ( 2)  {res}Dp = 0

{txt}       F(  2,   146) ={res}   11.97
{txt}{col 13}Prob > F ={res}    0.0000
{txt}
{com}. 
. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. predict double resid, residual
{txt}(4 missing values generated)

{com}. wntestq resid, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    0.2312
{txt} Prob > chi2({res}4{txt})            = {res}    0.9938
{txt}
{com}. drop resid
{txt}
{com}. 
. *Negative binomial
. count if iUSCasualty==0
{res}   19
{txt}
{com}. * 19 zero observations - grid search to find c ==> c=0.61
. gen ystar=iUSCasualty
{txt}
{com}. replace ystar=0.61 if iUSCasualty==0
{txt}(19 real changes made)

{com}. gen liUSCasualty=ln(ystar)
{txt}
{com}. nbreg iUSCasualty L(1/4).liUSCasualty FUND POST SEPT Dp IRAQ, robust

{txt}Fitting Poisson model:

Iteration 0:{col 16}log pseudolikelihood = {res}-340.94126{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-340.54499{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-340.47691{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-340.46112{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-340.45718{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-340.45642{txt}  
Iteration 6:{col 16}log pseudolikelihood = {res}-340.45629{txt}  
Iteration 7:{col 16}log pseudolikelihood = {res}-340.45626{txt}  
Iteration 8:{col 16}log pseudolikelihood = {res}-340.45626{txt}  

Fitting constant-only model:

Iteration 0:{col 16}log pseudolikelihood = {res}-378.25412{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res}-365.19596{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-365.17815{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-365.17814{txt}  

Fitting full model:

Iteration 0:{col 16}log pseudolikelihood = {res}-342.77416{txt}  
Iteration 1:{col 16}log pseudolikelihood = {res} -335.6584{txt}  
Iteration 2:{col 16}log pseudolikelihood = {res}-332.47285{txt}  
Iteration 3:{col 16}log pseudolikelihood = {res}-332.34896{txt}  
Iteration 4:{col 16}log pseudolikelihood = {res}-332.34643{txt}  
Iteration 5:{col 16}log pseudolikelihood = {res}-332.34642{txt}  

Negative binomial regression                      Number of obs   =  {res}      156
{txt}Dispersion           = {res}mean                       {txt}Wald chi2({res}9{txt})    =  {res}   440.93
{txt}Log pseudolikelihood = {res}-332.34642                 {txt}Prob > chi2     =  {res}   0.0000

{col 1}{text}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 14}{text}{c |}{col 26}    Robust
{col 1}{text} iUSCasualty{col 14}{c |}      Coef.{col 26}   Std. Err.{col 37}      z{col 46}   P>|z|{col 55}    [95% Conf. Interval]
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}liUSCasualty{col 14}{c |}
{col 1}{text}         L1.{col 14}{c |}{result}{space 2} .1290982{col 26}{space 2} .0772404{col 37}{space 1}    1.67{col 46}{space 3}0.095{col 55}{space 3}-.0222903{col 67}{space 3} .2804867
{col 1}{text}         L2.{col 14}{c |}{result}{space 2} .1178579{col 26}{space 2}  .077771{col 37}{space 1}    1.52{col 46}{space 3}0.130{col 55}{space 3}-.0345703{col 67}{space 3} .2702862
{col 1}{text}         L3.{col 14}{c |}{result}{space 2} .0258756{col 26}{space 2} .0822965{col 37}{space 1}    0.31{col 46}{space 3}0.753{col 55}{space 3}-.1354226{col 67}{space 3} .1871739
{col 1}{text}         L4.{col 14}{c |}{result}{space 2} .1708206{col 26}{space 2} .0798313{col 37}{space 1}    2.14{col 46}{space 3}0.032{col 55}{space 3} .0143541{col 67}{space 3} .3272871
{col 1}{text}        FUND{col 14}{c |}{result}{space 2} .0408456{col 26}{space 2} .1224511{col 37}{space 1}    0.33{col 46}{space 3}0.739{col 55}{space 3}-.1991542{col 67}{space 3} .2808455
{col 1}{text}        POST{col 14}{c |}{result}{space 2}  -.69526{col 26}{space 2} .2064028{col 37}{space 1}   -3.37{col 46}{space 3}0.001{col 55}{space 3}-1.099802{col 67}{space 3} -.290718
{col 1}{text}        SEPT{col 14}{c |}{result}{space 2}  .636883{col 26}{space 2} .3644791{col 37}{space 1}    1.75{col 46}{space 3}0.081{col 55}{space 3}-.0774829{col 67}{space 3} 1.351249
{col 1}{text}          Dp{col 14}{c |}{result}{space 2} -19.4291{col 26}{space 2} 1.060658{col 37}{space 1}  -18.32{col 46}{space 3}0.000{col 55}{space 3}-21.50795{col 67}{space 3}-17.35025
{col 1}{text}        IRAQ{col 14}{c |}{result}{space 2}-.0036415{col 26}{space 2} .3782678{col 37}{space 1}   -0.01{col 46}{space 3}0.992{col 55}{space 3}-.7450328{col 67}{space 3} .7377499
{col 1}{text}       _cons{col 14}{c |}{result}{space 2} .8909651{col 26}{space 2} .1764025{col 37}{space 1}    5.05{col 46}{space 3}0.000{col 55}{space 3} .5452225{col 67}{space 3} 1.236708
{col 1}{text}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}
{col 1}{text}    /lnalpha{col 14}{c |}{result}{space 2}-1.932776{col 27}{space 1} .2917211{col 55}{space 3}-2.504539{col 67}{space 3}-1.361013
{col 1}{text}{hline 13}{c +}{hline 12}{hline 12}{hline 8}{hline 8}{hline 12}{hline 12}
{col 1}{text}       alpha{col 14}{c |}{result}{space 2} .1447458{col 27}{space 1} .0422254{col 55}{space 3} .0817133{col 67}{space 3} .2564008
{col 1}{text}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 9}{hline 12}{hline 12}

{com}. test

{txt} ( 1)  {res}[iUSCasualty]L.liUSCasualty = 0
{txt} ( 2)  {res}[iUSCasualty]L2.liUSCasualty = 0
{txt} ( 3)  {res}[iUSCasualty]L3.liUSCasualty = 0
{txt} ( 4)  {res}[iUSCasualty]L4.liUSCasualty = 0
{txt} ( 5)  {res}[iUSCasualty]FUND = 0
{txt} ( 6)  {res}[iUSCasualty]POST = 0
{txt} ( 7)  {res}[iUSCasualty]SEPT = 0
{txt} ( 8)  {res}[iUSCasualty]Dp = 0
{txt} ( 9)  {res}[iUSCasualty]IRAQ = 0

           {txt}chi2(  9) ={res}  440.93
         {txt}Prob > chi2 ={res}    0.0000

{txt}
{com}. predict double iUSCasualty_pred
{txt}(option n assumed; predicted number of events)
(4 missing values generated)

{com}. line iUSCasualty iUSCasualty_pred Quarter
{res}{txt}
{com}. 
. *Testing null that 9/11 did have no impact on terrorism patterns (for F column)
. test SEPT Dp

{txt} ( 1)  {res}[iUSCasualty]SEPT = 0
{txt} ( 2)  {res}[iUSCasualty]Dp = 0

{txt}{col 12}chi2(  2) ={res}  347.19
{txt}{col 10}Prob > chi2 =  {res}  0.0000
{txt}
{com}. * Ljung-Box statistic Q(4) - testing H0: white noise(in residuals)--> the first 4 autocorrelations are jointly insignificant
. *** Predicting Pearson residuals
. scalar s2 = exp(_b[/lnalpha]) 
{txt}
{com}. gen nbresidual = (iUSCasualty-iUSCasualty_pred)/sqrt( iUSCasualty_pred*(1+iUSCasualty_pred*s2) )
{txt}(4 missing values generated)

{com}. wntestq nbresidual, lags(4)

{txt}Portmanteau test for white noise
{hline 39}
 Portmanteau (Q) statistic = {res}    0.4253
{txt} Prob > chi2({res}4{txt})            = {res}    0.9804
{txt}
{com}. drop nbresidual iUSCasualty_pred
{txt}
{com}. 
. * Which one is better fit? Based on AIC and BIC
. qui nbreg iUSCasualty L(1/4).liUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  156{col 25}-365.1781{col 37}-332.3464{col 48}   11{col 57} 686.6928{col 69} 720.2413
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui regress iUSCasualty L(1/4).iUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  156{col 25}   -385.2{col 37} -357.259{col 48}    9{col 57}  732.518{col 69} 759.9667
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui nbreg iUSCasualty L(1/4).iUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  156{col 25}-365.1781{col 37}-331.4838{col 48}   11{col 57} 684.9676{col 69}  718.516
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. qui poisson iUSCasualty L(1/4).iUSCasualty FUND POST SEPT Dp IRAQ, robust
{txt}
{com}. estat ic

{txt}{hline 13}{c TT}{hline 63}
       Model {c |}    Obs    ll(null)   ll(model)     df          AIC         BIC
{hline 13}{c +}{hline 63}
{ralign 12:.}{col 14}{c |}{res}{col 17}  156{col 25}-398.7153{col 37}-339.3446{col 48}   10{col 57} 698.6891{col 69} 729.1877
{txt}{hline 13}{c BT}{hline 63}
{p 15 22 2}
Note:  N=Obs used in calculating BIC; see {helpb bic_note:[R] BIC note}
{p_end}

{com}. drop ystar liUSCasualty
{txt}
{com}. 
{txt}end of do-file

{com}. log close
       {txt}log:  {res}MICs.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 9 Jan 2011, 16:46:24
{txt}{.-}
{smcl}
{txt}{sf}{ul off}